﻿<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>微信开放平台系统后台-登录</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="/favicon.ico">
    <link href="/admin/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="/admin/static/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/admin/static/css/animate.min.css" rel="stylesheet">
    <link href="/admin/static/css/style.min.css" rel="stylesheet">
    <link href="/admin/static/css/login.min.css" rel="stylesheet">
    <script src="/admin/static/js/jquery.min.js"></script>
    <script src="/admin/static/js/common.js"></script>
    <script src="/admin/static/js/plugins/layer/layer.min.js"></script>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script type="text/javascript">
        if (window.top !== window.self) { window.top.location = window.location };
        $(function () {
            $(".btn-login").unbind("click").click(function () {
                if ($.trim($(".uname").val()) == "") {
                    layer.alert("请输入用户名!");
                    return false;
                }
                if ($.trim($(".pword").val()) == "") {
                    layer.alert("请输入登录密码!");
                    return false;
                }
                if (window.isgetting) { return; }
                window.isgetting = true;
                $.ajax({
                    url: "/Admin/Login?rnd=" + Math.random(),
                    type: 'POST',
                    data: { username: $(".uname").val(), userpwd: $(".pword").val() },
                    dataType: 'json',
                    success: function (ret) {
                        delete window.isgetting;
                        if (ret.sucess == true) {
                            window.top.location.href = "/admin/Index.html";
                        }
                        else {
                            layer.alert("登录失败," + ret.info);
                            getImg();
                        }
                    },
                    error: function () {
                        delete window.isgetting;
                        layer.alert("登陆发生错误");
                        getImg();
                    }
                });
                return false;
            });
        });
        function getImg() {
            $("#icode").attr("src", "/Admin/Home/VCode.html?r=" + Math.random());
        }
    </script>
    <style>
        .layui-layer-content {
            color: #000;
        }
    </style>
</head>

<body class="signin" style="background-color: #78b5fb;background: url(/admin/static/img/login-background.jpg) no-repeat center fixed;background-size:100% 100%;">
    <div class="signinpanel">
        <div class="row">
            <div class="col-sm-7">
                <div class="signin-info">
                    <div class="logopanel m-b">
                        <h1>[ 微信开放平台授权 ]</h1>
                    </div>
                    <div class="m-b"></div>
                </div>
            </div>
            <div class="col-sm-5">
                <form method="get" onsubmit="return false;">
                    <h4 class="no-margins">登录：</h4>
                    <p class="m-t-md">登录到微信开放平台</p>
                    <div class="form-group">
                        <input type="text" class="form-control uname" placeholder="用户名" required="" />
                    </div>
                    <div class="form-group">
                        <input type="password" class="form-control pword m-b" placeholder="密码" required="" />
                    </div>
                    <div class="form-group" style="margin-top:5px;">
                        <button class="btn btn-success btn-block btn-login">登录</button>
                    </div>
                </form>
            </div>
        </div>
        <div class="signup-footer">
            <div class="pull-left">
                &copy; 2020 All Rights Reserved. 微信开放平台管理系统
            </div>
        </div>
    </div>
</body>
</html>